package cn.wolfcode.wolf2w.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 目的地(行政地区：国家/省份/城市)
 */
@Setter
@Getter
@Document("spot")
@ToString
public class Spot extends  BaseDomain{

    private String name;
    private String engName;
    private int peopleNum;
    private int takeTimes;
    private String coverUrl;
    private String phoneNum;
    private List<String> imagesUrl;
    private String netAddress;
    private String descripInfo;
    private String trafficWay;
    private String ticketInfo;
    private String openTimeInfo;



    public String getJsonString(){
        Map<String,Object> map = new HashMap<>();
        map.put("id", super.getId());
        map.put("info", this.descripInfo);

        return JSON.toJSONString(map);
    }
}
